<!DOCTYPE html>
<html>
<head>
    <title>主播列表</title>
    <#include "/header.html">
</head>
<body>
<div id="webpage" v-cloak>
    <div v-show="appearance.showList">
        <div v-show="appearance.showControllBar" class="grid-btn">
            <span v-show="appearance.showSearchForm">
                <el-form :inline="true" :model="q" class="demo-form-inline" size="small">
                    <el-form-item label="昵称">
                        <el-input v-model="q.nickname" placeholder="请输入" clearable></el-input>
                    </el-form-item>
                    <el-form-item label="uid">
                        <el-input v-model="q.user_id" placeholder="请输入" clearable></el-input>
                    </el-form-item>
                    <el-form-item label="公会id">
                        <el-input v-model="q.guild_id" placeholder="请输入" clearable></el-input>
                    </el-form-item>
                    <el-form-item label="状态">
                        <el-select v-model="q.is_verify_idcard">
                        <el-option
                                v-for="item in options"
                                :key="item.value"
                                :label="item.label"
                                :value="item.value">
                        </el-option>
                      </el-select>
                    </el-form-item>
                    <el-button type="primary" @click="query" size="small" icon="el-icon-search">查询</el-button>
                    <#if shiro.hasPermission("dataview:viewuserfullinfo:save")>
                    <el-button type="primary" @click="add" size="small" icon="el-icon-plus">新增主播</el-button>
                    </#if>
                </el-form>
            </span>
        </div>
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>
    <el-dialog
            title="新增主播"
            :visible.sync="centerDialogVisible"
            width="40%"
            center>
        <el-form :model="viewUserFullInfo" size="small" :rules="rules"  label-width="80px" label-position="left" ref="viewUserFullInfo">
            <el-form-item label="主播ID" prop="user_id">
                <el-input v-model="viewUserFullInfo.user_id" placeholder="请输入主播ID" clearable></el-input>
            </el-form-item>
            <el-form-item label="真实姓名" prop="realname">
                <el-input v-model="viewUserFullInfo.realname" placeholder="请输入真实姓名" clearable></el-input>
            </el-form-item>
            <el-form-item label="分成比例" prop="sharerate">
                <el-select v-model="viewUserFullInfo.sharerate">
                    <el-option
                            v-for="item in sharerates"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value">
                    </el-option>
                </el-select>
            </el-form-item>
            <el-form-item label="合作期限" prop="cooperation">
                <el-select v-model="viewUserFullInfo.cooperation">
                    <el-option
                            v-for="item in cooperations"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value">
                    </el-option>
                </el-select>
            </el-form-item>
        </el-form>
        <span slot="footer" class="dialog-footer">
            <el-button @click="centerDialogVisible = false">取 消</el-button>
            <el-button type="primary" @click="centerDialogVisible = false">确 定</el-button>
          </span>
    </el-dialog>
</div>
<script>
    set_grid_column_formatter('dataview/viewuserfullinfo/isVerifyIdcard',function (cellValue , options , rowData) {
        if(parseInt(cellValue)==0){
            return str_format('<i class="label label-success">未认证</i>');
        }
        return str_format('<i class="label label-warning">已认证</i>');
    })

</script>
<script src="${request.contextPath}/statics/js/modules/live/liverfullinfolist.js?_${.now?long}"></script>
</body>
</html>